package com.insigma.gwy.style;

import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFFont;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

/**
 * @Author: liujh
 * @Email: liujh@epsoft.com.cn
 * @date: 2021-01-05
 */
public class ExcelStyle {

    public static XSSFCellStyle SheetStyle(XSSFWorkbook workbook){

        XSSFCellStyle style = workbook.createCellStyle();
        XSSFFont font = workbook.createFont();
        font.setFontHeightInPoints((short)15);
        font.setBold(true);
        style.setFont(font);
        return style;
    }

    public static XSSFCellStyle FontStyle(XSSFWorkbook workbook){

        XSSFCellStyle style = workbook.createCellStyle();
        XSSFFont font = workbook.createFont();
        font.setFontHeightInPoints((short)12);
        style.setFont(font);
        return style;
    }
    
}
